import request from "../utils/request";

const api_name = `/api/hosp/hospital`;

export default {
  // 根据排班id获取排班数据
  getSchedule(id) {
    return request({
      url: `${api_name}/getSchedule/${id}`,
      method: "get",
    });
  },
  // 获取科室预约挂号规则
  getBookingScheduleRule(page, limit, hoscode, depcode) {
    return request({
      url: `${api_name}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
      method: "get",
    });
  },
  // 获取排班信息
  findScheduleList(hoscode, depcode, workDate) {
    return request({
      url: `${api_name}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
      method: "get",
    });
  },
  // 查询医院列表
  getPageList(page, limit, searchObj) {
    return request({
      url: `${api_name}/${page}/${limit}`,
      method: "get",
      params: searchObj,
    });
  },

  // 根据医院名称模糊查询
  getHospByHosname(hosname) {
    return request({
      url: `${api_name}/findByHosname/${hosname}`,
      method: "get",
    });
  },

  // 获取科室列表
  findDepartment(hoscode) {
    return request({
      url: `${api_name}/department/${hoscode}`,
      method: "get",
    });
  },
  // 医院预约挂号详情
  show(hosname) {
    return request({
      url: `${api_name}/findHospDetail/${hosname}`,
      method: "get",
    });
  },
};
